import request from '../Util/axios/request.js';

export function findAll() {
  return request.get('/shopProducts/all',null);
}

export function addfoodOrder(data) {
  return request.post('/catering/addfoodOrder',data);
}

export function findHotSales(id) { //api/shopProducts/hot/1
  return request.get(`/shopProducts/hot/${id}`);
}
export function findKillSales(id) { //api/shopProducts/hot/1
  return request.get(`/shopProducts/kill/${id}`);
}

export function findOpt(id) { //api/shopProducts/hot/1
  return request.get(`/shopSpecOptions/opt/${id}`);
}

export function findAddPriceById(id) { 
  return request.get(`/productSpecRelations/addprice/${id}`);
}

export function alipayOrder(data) {
  data.RETURN_URL = "http://localhost:8888/Checkout";
  data.NOTIFY_URL = "http://yeyyy.mynatapp.cc/api/medical/notify";
  data.body = Object.values(data).join(',');
  return request.post('/alipay/order', data);
}
export function insertOrder(data) {
  return request.post('/order/insert', data);
}
export function insertOrderItems(data) {
  return request.post('/shopItems/items', data);
}
export function insertOrderItems2(data) {
  return request.post('/shopItems/items2', data);
}


